# -*- encoding : utf-8 -*-
# @Time : 2022/12/9 21:25
# @Author : Future
# @Email : ccsmlg@vip.qq.com
# @File : urls.py
# @Software : PyCharm
from .views import StudentViewSet, ClassesViewSet
from django.urls import path
from rest_framework.routers import DefaultRouter, SimpleRouter

urlpatterns = [

]
router = DefaultRouter()  # 创建路由器
# 注册路由器，想要用什么访问，单引号里面就写什么，改成aaa就是http://127.0.0.1:8000/drf_study/aaa/
router.register('students', StudentViewSet)
router.register('classes', ClassesViewSet)
urlpatterns += router.urls  # 把当前的路由拼接到当前的路由中

